package com.bridgeintelligent.tag.scene.service;

import com.bridgeintelligent.tag.scene.api.ISceneFuncService;
import com.bridgeintelligent.tag.scene.api.vo.*;
import com.bridgeintelligent.tag.scene.mapper.SceneFuncMapper;
import com.bridgeintelligent.tag.user.mgmt.pojo.User;
import com.bridgeintelligent.tag.webserver.security.TagSecurityHelper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;


/**
 * @description
 * @author: grp 2021-01-10 21:47
 **/
@AllArgsConstructor
@Service
@Slf4j
public class SceneFuncServiceImpl implements ISceneFuncService {
    private SceneFuncMapper mapper;

    @Override
    public List<FuncVO> findCustomers() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findCustomers(user.getUserId());
    }

    @Override
    public List<FuncVO> findCombinations() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findCombinations(user.getUserId());
    }

    @Override
    public List<FuncVO> findFrees() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findFrees(user.getUserId());
    }

    @Override
    public List<FuncVO> findExplores() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findExplores(user.getUserId());
    }

    @Override
    public List<FuncVO> findExports() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findExports(user.getUserId());
    }

    @Override
    public List<FuncVO> findLooklikes() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findLooklikes(user.getUserId());
    }

    @Override
    public List<FuncVO> findCustomersTracks() {
        User user = TagSecurityHelper.currentUser();
        return mapper.findCustomersTracks(user.getUserId());
    }

}
